#include <stdio.h>
int FindFactory(int n)
{
	if (n > 1)
	{
		return n * FindFactory(n - 1);
	}
	else
		return 1;
}
int main()
{
	int num = 0;
	scanf_s("%d", &num);
	printf("%d", FindFactory(num));
	return 0;
}